Content and resources for the Java 8 in Anger presentation.
This vJUG video of Java 8 in Anger shows the Java 8 version of this talk in its clearest form. Here I also have links to other material I've published on this topic, and to the resources I used to create the code.
In 2016 this talk has evolved to also contain some Java 9 features too, and the latest version even shows how to use TDD to help figure out which stream operations you need. The video of the latest version is not yet available.
Videos
Other videos
- Java 8 (and 9) In Anger at YOW!
- Java 8 (and 9) In Anger at Lambda World
- Devoxx UK
- QCon New York (in this version, you get to see what happens when it goes wrong...)
- Devoxx France
- CraftConf (not quite as easy to see the code)
- First ever version! QCon London (code has been simplified a little since then)
More details
Firstly, you might want to read Why Java 8?, and 5 Java 8 Features That You Won't Be Able To Live Without.
You can follow my tutorial on "Building Java 8 Applications with Microservices", which is a deep dive into the code I write in the presentation - 3 hours of material where I go into each section in a lot more detail:
Alternatively, you can watch this tutorial with a Safari Books Online subscription.
I also wrote an article for Oracle Technology Network in which I go into some of the interesting code sections in more detail. It also shows more clearly some of the features of IntelliJ IDEA that make the transition to Java 8 a bit easier for developers.
Project code
- The full application code on the master branch branch of my sense repository.
- If you want to play along from the beginning of the demo, check out starting_point.
- There's a branch which shows the steps of the application as a series of independent steps.
- You will find a whole mess of various branches. The conference names are the final working code demoed at that conference.
Resources
The following is a list of the resources I used to create the talk, and can be used to find more information about any of the technologies or approaches used during the presentation.
Java 8 & Java EE Overview
- Java 8 Tutorial
- Book: Java 8 in Action
- Book: Java 8 for the Really Impatient
- Book: Beginning Java EE 7
Lambdas and Streams
- Book: Lambdas and Streams by Richard Warburton, highly recommended
- Java 8: From ordinary for-loop to an intstream
- Processing Data with Java SE 8 Streams, Part 1, by Raoul-Gabriel Urma
- Book: Java 8 in Action also by Raoul-Gabriel Urma, and Mario Fusco & Alan Mycroft
- Code: lambda-behave, a Java 8 testing framework
JavaFX
- Introduction to JavaFX - invaluable. Short enough to download as PDF and read cover-to-cover.
- Building serious JavaFX Applications - Adam Bien: ((https://www.youtube.com/watch?v=gKU7ZeCNbqU), code and JavaFX Integration Strategies article.
- Concurrency in JavaFX
- Using JavaFX Collections
- Introduction to FXML
- Using FXML to Create a User Interface
- Using FXML to create a Table View
- Using JavaFX properties and binding
- Creating Binary WebSocket Connections with Java EE 7 and JavaFX
- Code: honest-profiler, an Open Source project that uses JavaFX
- Book: Java 8 for the Really Impatient, includes a section on JavaFX
Websockets
- JSR-356, Java API for WebSocket
- Java WebSockets (JSR-356) on Jetty 9.1
- JSR 356 - Java API for Websocket (Java Client)
- Introduction to Websockets
- Annotated Websocket Clients
- Websockets: Using encoders and decoders
- Creating Binary WebSocket Connections with Java EE 7 and JavaFX
- Code: embedded-jetty-websocket-examples examples of how to create Jetty Websockets
Date and Time
- Java SE 8 Date and Time by Ben Evans and Richard Warburton
- Book: Java 8 in Action
- Book: Java 8 for the Really Impatient
Optional
Files
- Reading, Writing, and Creating Files - much simplified since Java 7
Microservices
- Martin Fowler on Microservices: 25 minute video overview and article
- Introduction to Microservices
- Article & link to video: Practical Implications of Microservices in 14 Tips
Special Thanks To...
Martin Thompson, Richard Warburton,
Robert Annett and Hadi Hariri for
code reviewing and giving great suggestions. Not all suggestions have been implemented yet, so all errors are my own.
Abstract
Java 9 is just around the corner, and yet many of us developers have yet to use Java 8 features in an application. The
goal of this presentation is to move beyond slide-sized examples of streams and lambdas, and to show how to build a
fully working end-to-end application using as few external dependencies as possible, and the latest version of Java.
In this session, Trisha will build a Java 8 application live. This application will consume a real-time feed of high
velocity data, contain services that make sense of the data, and present it in a JavaFX dashboard. Along the way, we'll
encounter Java 8 streams, lambdas, new ways of working with collections, and bump into the new date and time API.